function submitForm(sName, sAction, sConfirm) {
    oForm = document.forms[sName];
    if (sConfirm) {
        if (!confirm(sConfirm)) return;
    }
    if (sAction) {
        oForm['act'].value = sAction;
    }
    oForm.submit();
}

function addUrlParameter(sUrl, sName, sValue) {
    sUrl = sUrl.replace(/#.*/, '');
    sUrl += sUrl.search(/\?/) == -1 ? '?' : '&';
    sUrl += encodeURI(sName) + '=' + encodeURI(sValue);
    return sUrl;
}